﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Battleborn.Core.Models;

namespace Battleborn.Core.Repositories
{
    public static class RepositoryExtensions
    {
        public static IQueryable<Player> Online(this IQueryable<Player> source)
        {
            return source.Where(u => u.Status != (int)PlayerStatus.Offline);
        }

        public static IEnumerable<Player> Online(this IEnumerable<Player> source)
        {
            return source.Where(u => u.Status != (int)PlayerStatus.Offline);
        }
    }
}
